


//
//  baseCommonMethod+App.m
//  baseVC
//
//  Created by 陶磊 on 2019/12/16.
//  Copyright © 2019 QHT. All rights reserved.
//

#import "baseCommonMethod+App.h"
//#import "NSString+Hash.h"
//#import "CLCWLoginVC.h"
//#import "CLCWNavigationVC.h"
//#import "CLCWOneButtonAlertView.h"
#import "MBProgressHUD.h"



@implementation baseCommonMethod (App)

//获得公钥
//+ (void)getPublicKeyFromNetWorking:(void (^)(NSString *str))resultString{
//    [CLCWHttpClient requestPOST:CLCWGetRSAURL parameters:nil isNeedlogin :NO success:^(id data, long code, NSString *msgString) {
//        //网络请求成功
//        NSString *result = [NSString stringWithFormat:@"%@",data];
//        resultString(result);
//    } failure:^(id data, long code, NSString *msgString) {
//        if (code != NetworkingFailCode) {
//            [ZHUToast makeOnTheWindow:msgString];
//        }
//    }];
//}

//在window上展示hud
+ (void)showGlobalProgressHUD:(BOOL)animated {
    [MBProgressHUD showHUDAddedTo:[UIApplication sharedApplication].keyWindow animated:animated];
}

//隐藏window上的hud
+ (void)hideGlobalHUD:(BOOL)animated {
    [MBProgressHUD hideHUDForView:[UIApplication sharedApplication].keyWindow animated:animated];
}

//+ (id)loginWithNaviVC:(NSDictionary *)userInfo {
//    CLCWLoginVC *loginVC = [[CLCWLoginVC alloc] init];
//    loginVC.userInfo = userInfo;
//    return [[CLCWNavigationVC alloc] initWithRootViewController:loginVC];
//}

//是否是体验账号
+ (BOOL)isUserTYCount
{
    NSUserDefaults *userDef = [NSUserDefaults standardUserDefaults];
    NSString *TYcount = [userDef objectForKey:@"TYcount"];
    if(TYcount && [TYcount isEqualToString:@"体验"]){
       return YES;
    }else{
       return NO;
    }
}


@end
